/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JanelaInformacoes2.java
 *
 * Created on 22/07/2011, 17:51:07
 */

package InterfaceEI;

/**
 *
 * @author Isabela
 */
public class JanelaInformacoes2 extends javax.swing.JFrame {

    /** Creates new form JanelaInformacoes2 */
    public JanelaInformacoes2() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPInform = new javax.swing.JPanel();
        jPIViga = new javax.swing.JPanel();
        labelTViga = new javax.swing.JLabel();
        jTTamViga = new javax.swing.JTextField();
        labelMTViga = new javax.swing.JLabel();
        labelXViga = new javax.swing.JLabel();
        jTXViga = new javax.swing.JTextField();
        labelMXViga = new javax.swing.JLabel();
        jPIConcentrada = new javax.swing.JPanel();
        labelXConc = new javax.swing.JLabel();
        jTXConc = new javax.swing.JTextField();
        labelMXConc = new javax.swing.JLabel();
        labelForcaConc = new javax.swing.JLabel();
        jTForcaConc = new javax.swing.JTextField();
        labelNConc = new javax.swing.JLabel();
        jPIDistribuida = new javax.swing.JPanel();
        labelTDist = new javax.swing.JLabel();
        jTtamDist = new javax.swing.JTextField();
        labelMTDist = new javax.swing.JLabel();
        labelXDist = new javax.swing.JLabel();
        jTXDist = new javax.swing.JTextField();
        labelMXDist = new javax.swing.JLabel();
        labelForcaDist = new javax.swing.JLabel();
        jTForcaDist = new javax.swing.JTextField();
        labelNDist = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        labelXMom = new javax.swing.JLabel();
        jTXMomento = new javax.swing.JTextField();
        labelMXMom = new javax.swing.JLabel();
        labelForcaMom = new javax.swing.JLabel();
        jTForcaMom = new javax.swing.JTextField();
        labelNMom = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);

        jPInform.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Informações", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPInform.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPIViga.setBorder(javax.swing.BorderFactory.createTitledBorder("Viga"));
        jPIViga.setEnabled(false);

        labelTViga.setText("Tamanho:");
        labelTViga.setEnabled(false);

        jTTamViga.setEditable(false);
        jTTamViga.setEnabled(false);
        jTTamViga.setMaximumSize(new java.awt.Dimension(6, 20));
        jTTamViga.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTTamVigaActionPerformed(evt);
            }
        });
        jTTamViga.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTTamVigaKeyReleased(evt);
            }
        });

        labelMTViga.setText("m");
        labelMTViga.setEnabled(false);

        labelXViga.setText("Posição:");
        labelXViga.setEnabled(false);

        jTXViga.setEditable(false);
        jTXViga.setEnabled(false);
        jTXViga.setMaximumSize(new java.awt.Dimension(6, 20));
        jTXViga.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTXVigaActionPerformed(evt);
            }
        });

        labelMXViga.setText("m");
        labelMXViga.setEnabled(false);

        javax.swing.GroupLayout jPIVigaLayout = new javax.swing.GroupLayout(jPIViga);
        jPIViga.setLayout(jPIVigaLayout);
        jPIVigaLayout.setHorizontalGroup(
            jPIVigaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPIVigaLayout.createSequentialGroup()
                .addGroup(jPIVigaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPIVigaLayout.createSequentialGroup()
                        .addComponent(labelTViga)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTTamViga, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPIVigaLayout.createSequentialGroup()
                        .addComponent(labelXViga)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTXViga, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPIVigaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelMTViga)
                    .addComponent(labelMXViga))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPIVigaLayout.setVerticalGroup(
            jPIVigaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPIVigaLayout.createSequentialGroup()
                .addGroup(jPIVigaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelTViga)
                    .addComponent(jTTamViga, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelMTViga))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPIVigaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelXViga)
                    .addComponent(jTXViga, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelMXViga)))
        );

        jPInform.add(jPIViga, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, 123, -1));

        jPIConcentrada.setBorder(javax.swing.BorderFactory.createTitledBorder("Carga Concentrada"));
        jPIConcentrada.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        labelXConc.setText("Posição:");
        jPIConcentrada.add(labelXConc, new org.netbeans.lib.awtextra.AbsoluteConstraints(8, 25, -1, -1));

        jTXConc.setMaximumSize(new java.awt.Dimension(6, 20));
        jTXConc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTXConcActionPerformed(evt);
            }
        });
        jPIConcentrada.add(jTXConc, new org.netbeans.lib.awtextra.AbsoluteConstraints(52, 22, 38, -1));

        labelMXConc.setText("m");
        jPIConcentrada.add(labelMXConc, new org.netbeans.lib.awtextra.AbsoluteConstraints(94, 25, -1, -1));

        labelForcaConc.setText("F:");
        jPIConcentrada.add(labelForcaConc, new org.netbeans.lib.awtextra.AbsoluteConstraints(8, 53, -1, -1));

        jTForcaConc.setMaximumSize(new java.awt.Dimension(6, 20));
        jTForcaConc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTForcaConcActionPerformed(evt);
            }
        });
        jPIConcentrada.add(jTForcaConc, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 68, 20));

        labelNConc.setText("N");
        jPIConcentrada.add(labelNConc, new org.netbeans.lib.awtextra.AbsoluteConstraints(94, 53, -1, -1));

        jPInform.add(jPIConcentrada, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 100, 120, 80));

        jPIDistribuida.setBorder(javax.swing.BorderFactory.createTitledBorder("Carga Distribuida"));
        jPIDistribuida.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        labelTDist.setText("Tamanho:");
        jPIDistribuida.add(labelTDist, new org.netbeans.lib.awtextra.AbsoluteConstraints(8, 25, -1, -1));

        jTtamDist.setMaximumSize(new java.awt.Dimension(6, 20));
        jTtamDist.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTtamDistActionPerformed(evt);
            }
        });
        jPIDistribuida.add(jTtamDist, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 22, 42, -1));

        labelMTDist.setText("m");
        jPIDistribuida.add(labelMTDist, new org.netbeans.lib.awtextra.AbsoluteConstraints(106, 25, -1, -1));

        labelXDist.setText("Posição:");
        jPIDistribuida.add(labelXDist, new org.netbeans.lib.awtextra.AbsoluteConstraints(8, 51, -1, -1));

        jTXDist.setMaximumSize(new java.awt.Dimension(6, 20));
        jTXDist.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTXDistActionPerformed(evt);
            }
        });
        jPIDistribuida.add(jTXDist, new org.netbeans.lib.awtextra.AbsoluteConstraints(58, 48, 44, -1));

        labelMXDist.setText("m");
        jPIDistribuida.add(labelMXDist, new org.netbeans.lib.awtextra.AbsoluteConstraints(106, 51, -1, -1));

        labelForcaDist.setText("F:");
        jPIDistribuida.add(labelForcaDist, new org.netbeans.lib.awtextra.AbsoluteConstraints(8, 77, -1, -1));

        jTForcaDist.setMaximumSize(new java.awt.Dimension(6, 20));
        jTForcaDist.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTForcaDistActionPerformed(evt);
            }
        });
        jPIDistribuida.add(jTForcaDist, new org.netbeans.lib.awtextra.AbsoluteConstraints(22, 74, 80, -1));

        labelNDist.setText("N");
        jPIDistribuida.add(labelNDist, new org.netbeans.lib.awtextra.AbsoluteConstraints(106, 77, -1, -1));

        jPInform.add(jPIDistribuida, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 180, 123, 100));

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Carga Momento"));
        jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        labelXMom.setText("Posição:");
        jPanel3.add(labelXMom, new org.netbeans.lib.awtextra.AbsoluteConstraints(8, 25, -1, -1));

        jTXMomento.setMaximumSize(new java.awt.Dimension(6, 20));
        jTXMomento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTXMomentoActionPerformed(evt);
            }
        });
        jPanel3.add(jTXMomento, new org.netbeans.lib.awtextra.AbsoluteConstraints(52, 22, 38, -1));

        labelMXMom.setText("m");
        jPanel3.add(labelMXMom, new org.netbeans.lib.awtextra.AbsoluteConstraints(94, 25, -1, -1));

        labelForcaMom.setText("F:");
        jPanel3.add(labelForcaMom, new org.netbeans.lib.awtextra.AbsoluteConstraints(8, 53, -1, -1));

        jTForcaMom.setMaximumSize(new java.awt.Dimension(6, 20));
        jTForcaMom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTForcaMomActionPerformed(evt);
            }
        });
        jPanel3.add(jTForcaMom, new org.netbeans.lib.awtextra.AbsoluteConstraints(22, 53, 68, -1));

        labelNMom.setText("N");
        jPanel3.add(labelNMom, new org.netbeans.lib.awtextra.AbsoluteConstraints(94, 53, -1, -1));

        jPInform.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 280, 120, 80));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 155, Short.MAX_VALUE)
            .addGap(0, 155, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(0, 6, Short.MAX_VALUE)
                    .addComponent(jPInform, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 5, Short.MAX_VALUE)))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 370, Short.MAX_VALUE)
            .addGap(0, 370, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(0, 0, Short.MAX_VALUE)
                    .addComponent(jPInform, javax.swing.GroupLayout.PREFERRED_SIZE, 370, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTTamVigaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTTamVigaActionPerformed
        // eventoJTTamViga();
}//GEN-LAST:event_jTTamVigaActionPerformed

    private void jTTamVigaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTTamVigaKeyReleased
        //        String text = new String();
        //        text = jTTamViga.getText();
        //        if (!text.equalsIgnoreCase("")) {
        //            try {
        //                text = text.replaceAll(",", ".");
        //                double teste = Double.parseDouble(text);
        //                double t = utili.conversaoMPixelX(teste, panelPrincipal1.getWidth());
        //
        //                int xF = (int) Math.abs(panelPrincipal1.getxInicio() + t);
        //                int aux;
        //                if(panelPrincipal1.getxConcentrada() > panelPrincipal1.getxFimDist()){
        //                    aux = panelPrincipal1.getxConcentrada();
        //                }
        //                else{
        //                    aux = panelPrincipal1.getxFimDist();
        //                }
        //
        //                if (xF <= panelPrincipal1.getWidth() && (xF >= aux)) {
        //
        //                    tamanhoViga = teste;
        //                    panelPrincipal1.setxFim(xF);
        //
        //                    panelPrincipal1.repaint();
        //                    panelPrincipal1.validate();
        //                }
        //                else{
        //                    JOptionPane.showMessageDialog(null, "Tamanho Invalido!");
        //                    setTViga();
        //                }
        //            }
        //            catch (NumberFormatException ex) {
        //            }
        //            calcula();
        //        }
}//GEN-LAST:event_jTTamVigaKeyReleased

    private void jTXVigaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTXVigaActionPerformed
        //eventoJTxViga();
}//GEN-LAST:event_jTXVigaActionPerformed

    private void jTXConcActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTXConcActionPerformed
        //eventoTXConc();
}//GEN-LAST:event_jTXConcActionPerformed

    private void jTForcaConcActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTForcaConcActionPerformed
        //eventoJTForcaConc();
}//GEN-LAST:event_jTForcaConcActionPerformed

    private void jTtamDistActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTtamDistActionPerformed
        //eventoJTTamDist();
}//GEN-LAST:event_jTtamDistActionPerformed

    private void jTXDistActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTXDistActionPerformed
        // eventoJTxDist();
}//GEN-LAST:event_jTXDistActionPerformed

    private void jTForcaDistActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTForcaDistActionPerformed
        //eventoJTxForcaDist();
}//GEN-LAST:event_jTForcaDistActionPerformed

    private void jTXMomentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTXMomentoActionPerformed
        //eventoTXMom();
}//GEN-LAST:event_jTXMomentoActionPerformed

    private void jTForcaMomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTForcaMomActionPerformed
        //eventoJTForcaMom();
}//GEN-LAST:event_jTForcaMomActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new JanelaInformacoes2().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPIConcentrada;
    private javax.swing.JPanel jPIDistribuida;
    private javax.swing.JPanel jPIViga;
    private javax.swing.JPanel jPInform;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JTextField jTForcaConc;
    private javax.swing.JTextField jTForcaDist;
    private javax.swing.JTextField jTForcaMom;
    private javax.swing.JTextField jTTamViga;
    private javax.swing.JTextField jTXConc;
    private javax.swing.JTextField jTXDist;
    private javax.swing.JTextField jTXMomento;
    private javax.swing.JTextField jTXViga;
    private javax.swing.JTextField jTtamDist;
    private javax.swing.JLabel labelForcaConc;
    private javax.swing.JLabel labelForcaDist;
    private javax.swing.JLabel labelForcaMom;
    private javax.swing.JLabel labelMTDist;
    private javax.swing.JLabel labelMTViga;
    private javax.swing.JLabel labelMXConc;
    private javax.swing.JLabel labelMXDist;
    private javax.swing.JLabel labelMXMom;
    private javax.swing.JLabel labelMXViga;
    private javax.swing.JLabel labelNConc;
    private javax.swing.JLabel labelNDist;
    private javax.swing.JLabel labelNMom;
    private javax.swing.JLabel labelTDist;
    private javax.swing.JLabel labelTViga;
    private javax.swing.JLabel labelXConc;
    private javax.swing.JLabel labelXDist;
    private javax.swing.JLabel labelXMom;
    private javax.swing.JLabel labelXViga;
    // End of variables declaration//GEN-END:variables

}
